﻿@model ThesisSystem.Models.LogOnModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>登录</title>
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/CSS/Common.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/CSS/Login.css")" rel="stylesheet" type="text/css" />
    @Content.Script("jquery-min.js", Url)
    @Content.Script("jquery-ui-min.js", Url)
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
</head>
<body>
    <div id="loginBox">
        <div class="ltop"></div>
        <div class="lbody">
            
            @using (Html.BeginForm()){
            
            <table>
                <tr>
                    <th>@Html.LabelFor(m => m.UserName)</th>
                    <td>
                        @Html.EditorFor(m => m.UserName)
                        @Html.ValidationMessageFor(m => m.UserName)
                    </td>
                </tr>
                <tr>
                    <th>@Html.LabelFor(m => m.Password)</th>
                    <td>
                        @Html.PasswordFor(m => m.Password)
                        @Html.ValidationMessageFor(m => m.Password)
                    </td>
                <tr>
                    <th></th>
                    <td>
                        @Html.CheckBoxFor(m => m.RememberMe)
                        @Html.LabelFor(m => m.RememberMe)
                    </td>
                </tr>
                </tr>
                <tr>
                    <td class="btnBox" colspan="2">
                        <input type="submit" value="登录" />
                        <input id="btnRegister" type="button" value="注册" />
                    </td>
                </tr>
            </table>
                @Html.ValidationSummary(true, "登录失败，请确认后重试。")
            }
        </div>
        <div class="lbottom"></div>
    </div>
    <div id="regBox" title="学生注册">
        <iframe src="" width="98%" height="96%" frameborder="0"></iframe>
    </div>
    <script type="text/javascript">
        $(function () {
            $("#regBox").dialog({
                modal: true,
                autoOpen: false,
                width: 180,
                height: 220,
                resizable: false
            });
            $(":submit").button();
            $("#btnRegister").button().bind("click", function () {
                $("iframe").attr("src","@Url.Action("Register","Account")");
                $("#regBox").dialog("open");
            });
        });
    </script>
</body>
</html>
